define([
	'backbone',
	'./components/header.scroll',
	'./components/swiper',
	'./components/pic.checker',
	'./components/nav.scroll'
	], function(Backbone, HeaderScroll, Swiper, PicChecker, NavScroll) {

		var PointDetailView = Backbone.View.extend({
			el: '#app',
			initialize: function() {
				this.initHeaderScroll();
				this.initSwiper();
				// 头部导航滚动组建
				this.initNavScroll();
			},
			events: {
				'click .intro-show-more': 'evt_showDetailInfo',
				'click #j_detail_tip': 'evt_showPicChecker'
			},
			initHeaderScroll: function() {
				this.HeaderScroll = new HeaderScroll({
					banner: '.com-detail-banner'
				});
			},
			initNavScroll: function() {
				this.NavScroll = new NavScroll();
			},
			initSwiper: function() {
				this.pointSwiper = new Swiper({
					el: this.$(".j_point_list"),
					slidesPerView: 'auto'
				});
				// 图片查看器
				this.picChecker = new PicChecker({
					el: this.$('[data-nm="pic-checker"]')
				});
			},
			evt_showDetailInfo: function(e) {
				var $current = $(e.currentTarget);
				$current.hide().siblings('.intro-detail-article').find('p').show();
			},
			evt_showPicChecker: function(e) {
				// 显示对应的pic查看器
				this.picChecker && this.picChecker.show();
			}
		})

		return new PointDetailView();

});